package com.hjl.spring6.autowired.service;

import com.hjl.spring6.autowired.dao.UserDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

/**
 * @author ServivE
 * @version 0.1
 * @className UserServiceImpl
 * @description
 * @date 2024/8/6 19:26
 * @since jdk11
 */
@Service
public class UserServiceImpl implements UserService{
    //注入dao
    //最后方式:两个注解，根据名称注入
    @Autowired
    @Qualifier(value = "user2DaoImpl")
    private UserDao userDao;
    @Override
    public void addUserService() {
        System.out.println("service....");
        userDao.add();
    }
}
